<html>
<head><meta charset="utf-8"><title>IntelliJ Platform Plugin · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/IntelliJ.20Platform.20Plugin.html">IntelliJ Platform Plugin</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="242502072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/IntelliJ%20Platform%20Plugin/near/242502072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> HTGAzureX1212. <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/IntelliJ.20Platform.20Plugin.html#242502072">(Jun 13 2021 at 10:19)</a>:</h4>
<p>I am interested in working on an IntelliJ Platform plugin for Rust Analyzer. Are there any resources on which how I can start doing so? As in, are there any things that I have to do before implementing the plugin? (I have already created the project and is willing to work with you guys to get Rust Analyzer support on IntelliJ Platform because Rust Analyzer is amazing!)</p>



<a name="242502137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/IntelliJ%20Platform%20Plugin/near/242502137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/IntelliJ.20Platform.20Plugin.html#242502137">(Jun 13 2021 at 10:20)</a>:</h4>
<p><a href="https://github.com/gtache/intellij-lsp">https://github.com/gtache/intellij-lsp</a> might be a starting point, although I don't know whether it would be a good starting point.</p>



<a name="242502216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/IntelliJ%20Platform%20Plugin/near/242502216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> HTGAzureX1212. <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/IntelliJ.20Platform.20Plugin.html#242502216">(Jun 13 2021 at 10:22)</a>:</h4>
<p>I have had a look at it - it currently uses RLS. And it is written in Scala - I plan to write it using Kotlin instead. I will have a look - also the fact that it has been stopped for a while due to the pandemic - it might be a good time for a Rust Analyzer plugin for the IntelliJ Platform. IntelliJ Rust is <em>good enough</em> for the most part IMO, but there are various things that Rust Analyzer can do but not IntelliJ Rust.</p>



<a name="242502235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/IntelliJ%20Platform%20Plugin/near/242502235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/IntelliJ.20Platform.20Plugin.html#242502235">(Jun 13 2021 at 10:23)</a>:</h4>
<p>If I were solving this problem in the abstract, I'd build two things:</p>
<ul>
<li>First, an vscode-language-server-node analogue: a library that adapts LSP concepts to the underlying editor (IntelliJ)</li>
<li>Second, a rust-specific library using this plugin</li>
</ul>
<p>In terms of how to actually do this properly, <a href="https://github.com/JetBrains/intellij-plugins/tree/master/Dart">https://github.com/JetBrains/intellij-plugins/tree/master/Dart</a> (dart plugin) would be the right place to learn from</p>



<a name="242502328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/IntelliJ%20Platform%20Plugin/near/242502328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> HTGAzureX1212. <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/IntelliJ.20Platform.20Plugin.html#242502328">(Jun 13 2021 at 10:25)</a>:</h4>
<p>Thank you! I will have a look. <span aria-label="thumbs up" class="emoji emoji-1f44d" role="img" title="thumbs up">:thumbs_up:</span></p>



<a name="242502386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/IntelliJ%20Platform%20Plugin/near/242502386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> HTGAzureX1212. <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/IntelliJ.20Platform.20Plugin.html#242502386">(Jun 13 2021 at 10:26)</a>:</h4>
<p>I will also probably branch off rust-analyzer for the addition for the Rust Analyzer IntelliJ Platform plugin. Thanks!</p>



<a name="242502455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/IntelliJ%20Platform%20Plugin/near/242502455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/IntelliJ.20Platform.20Plugin.html#242502455">(Jun 13 2021 at 10:28)</a>:</h4>
<p>Solving this problem concretely in the most useful way is a tough exercise in system's design -- obviously, JetBrains at some point might or might not add first class LSP support to the platform. </p>
<p>With this in mind, to keep the work maximally useful in the long-run, I'd keep an eye at the following exit strategies:</p>
<ul>
<li>salvaging editor-independent LSP integration (ie, producing a JVM library which can be used in eclipse)</li>
<li>looking at the integration with IntelliJ Rust as the end-goal</li>
<li>looking at the graduating into official LSP client for the intellij platform</li>
</ul>



<a name="242502616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/IntelliJ%20Platform%20Plugin/near/242502616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> HTGAzureX1212. <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/IntelliJ.20Platform.20Plugin.html#242502616">(Jun 13 2021 at 10:30)</a>:</h4>
<p>Alright!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>